﻿/*
 * @Author: Xavier 1305433186@qq.com
 * @Date: 2024-07-27 16:15:43
 * @LastEditors: Xavier 1305433186@qq.com
 * @LastEditTime: 2024-08-14 14:46:59
 * @FilePath: \JS32T031_SDK\User\task\device_station_data.c
 * @Description:
 *
 * STAYTRUE (c) 2024 by ${Xavier}, All Rights Reserved.
 */

#include "device_station_data.h"
#include "main.h"

DEVICE_STATION_DATA_T Device_Station_Data;

void DataInit(void)
{
    memset(&Device_Station_Data, 0, sizeof(Device_Station_Data));
}

void send_app_treadmill_data_analysis(DRIVER_BOARD_DATA_T *driver_board_data)
{
    unsigned int flagBit = 0x01;
    for (int i = 0; i <= 5; i++)
    {
        flagBit = 0x01 << i;
        if ((driver_board_data->flags & flagBit) == flagBit)
        { // 遍历flag每一位
         switch (i)
            {
            case 0: // 转速
                break;
            case 1: // 步数
                break;
            case 2: // 错误代码
                break;
            case 3: // 电机输入功率
                break;
            case 4: // 电机输出功率
                break;
            case 5: // Iq
                break;
            default:
                break;
            }
        }
    }
}

void data_calculation_task(void)
{
}
